package com.tydic.mysql2kafka.listener;

import com.tydic.mysql2kafka.service.BinLogHandleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author chenwk
 * @version 1.0.0
 * @ClassName BinlogClientRunner
 * @Description 程序启动后 运行binlog日志监听器
 * @createTime 2019年11月25日 11:06
 */
@Component
public class BinlogClientRunner implements CommandLineRunner {

    @Autowired
    private BinLogHandleService handleMysqlBinLogService;

    @Override
    public void run(String... args) throws Exception {
        handleMysqlBinLogService.startBinLogListener();
    }
}
